<template>
  <div class="swiper">
    <swiper :options="swiperOptions">
      <swiper-slide v-for="item of swiperList" :key="item.id">
        <img class="swiper-img" :src="item.imgURL">
      </swiper-slide>
      <div class="swiper-pagination" slot="pagination"></div>
    </swiper>
  </div>
</template>
<script>
export default {
  name: 'HomeSwiper',
  data () {
    return {
      swiperOptions: {
        pagination: '.swiper-pagination',
        paginationClickable: true,
        loop: true,
        autoplay: 2500,
        observer: true,
        observeParents: true
      },
      swiperList: [
        {'id': '0001', 'imgURL': '/static/homeSwiper/slider01.png'},
        {'id': '0002', 'imgURL': '/static/homeSwiper/slider02.png'},
        {'id': '0003', 'imgURL': '/static/homeSwiper/slider03.jpg'}
      ]
    }
  }
}
</script>

<style lang="stylus" scoped>
.swiper
    width 100%
    .swiper-img
      width 100%
      height 3.5rem
</style>
